namespace go user

service User {
    ResCheckUser checkUser(1:ReqCheckUser req)
    ResInsertUser insertUser(1: ReqInsertUser req)
    ResGetUserByUsername getUserByUsername(1: ReqGetUserByUsername req)
}

struct ReqCheckUser {
    1: string username
    2: string password
}

struct ResCheckUser {
    1: bool isExist
}

struct ReqInsertUser {
    1: string username
    2: string password
    3: string avatar
    4: i32 gender
}

struct ResInsertUser {
    1: bool isExist
}

struct ReqGetUserByUsername {
    1: string username
}

struct ResGetUserByUsername {
    1: string username
    2: string createdAt
    3: string avatar
    4: i32 gender
    5: string updatedAt
    6:i32 id
}